Fix send command of controls loop. Clean up.