Issue #10 - a bit of refactoring in cli.go