Implement command line flags. This fixes #5.