refactored the format in which queries are sent to the server, fixed some bugs
version bump 0.4.2