Refactored command system