Features/refactor query interface

Refactored query interface to not suck anymore. 

Fixes some incorrectly set property-stuff.