CLI Refactor