Refactoring of command line classes