Implemented the command line interface.