Fixed $by in query parser
Improves error reporting in query parser
Adds scaffolding for running queries