More refactoring on CliInterface
Minor refactorings and documentation