Move command handling to the command manager.