Many changes

-Added more WHERE capabilities
-Added better debug info
-Bug fixes