fixed bug and added getQuery function returning the constructed query
added QueryBuilder to main.js