Updated QueryProvider so that it can query a bit easier