Command line refactoring