Refactored CLI commands.