refactoring qa_categories_controller