Removed unnecessary functions
Added validity checking to parsing of response
Added validity checking to parsing of rpc error
Removed unnecessary constants
Added request type for testing
Added test for detecting wrong JSON RPC version