Added ability to respond to synch queries - both materialized and non-materialized queries working
TODO: add same ability for asynch queries