Refactor robot commands