Refactor CommandLineInterface class to no longer use a while loop (because no one likes them), and instead use a recursive function that can be tested. Update specs to passing.