Refactored command mapping