Refactor methods in CLI class
Refactor specs for CLI class