Fixed query problems and removed obsolete classes

Fixed query problems on query circular, one point and polygonal about structure of query.
Removed a series of obsolete classes, unnecessary for our project.