JUnit test for Cli class. Minor fixes and refactoring
ctrl + shift + f on Cli.java