Refactoring command definition