Refactored QueryFormController, moved nonUI logic to services