Restructured DatabaseQuery to use methods for queries instead of a main