Heavy lifting of the command line interface.