Refactored QueryFormView