Work towards refactoring command line code.