Huge refactoring to use JObjects for queries and responses
Serialization test passing