added some tests and removed RemoteError interface. Test coverage: 90.2% of statements
simplified read/write implementation. Test coverage: 89.7% of statements