Refactored CLI