Added new QAgent class, and improved the setup
Refactored the code copied to QAgentAdvanced