Removed data serialization in response and added query as class member