Moved Query to internal.containers.query and updated references
Implemented BaseQuery and IQuery
Updated references to these classes where necessary