Refactored command line interface