Refactor CLI to support unit testing