Refactored internal command system