little refactoring on the CLI interface - prepare to separate in it's own module