Implement new command-line interface

This is the beginning of an implementation of #92.