Changed queries to querybuilders
Removed debugging code