work extensively on query object so I can throw it out
minor reworks, query helpers and collation queries