Added callback registration to ControllerThread and improved command routing