Refactored queryj-templates to focus on a single template and to generate all boilerplate automatically based on .stg contents. refs #415