Adding better command framework with threading.