Adds typehint
Minor refactoring and sets up dummy Query object