MasterQuery now extends AbstractQuery instead of Query
Move toString functionality for queries into AbstractQuery
Reverting import sort