Cleaned up formatting. Removed client dependency on RPC types. Should always be going through API.