Continuing refactoring into command line tool, optimizing for readability