starting to implement a few query functions.
fixing whitespace and comments for debug mode
implement queryCampaigns