Refactored code for QAcontroller & deleted AAcontroller