Extract commands from handler.