Simplified cmd-handler.