general clean up on classes

annoying permission change is a mod

cleaned Query class methods
havent tested, linbox being dumb

* clean-up:
  general clean up on classes