Adding in the QueryModifier class

QueryModifier adds where, group, limit and order to any query.
This is now being used in the select interview dialog.