Reformatted to use triggers.

Unfortunately, the command-line isn't working the way I would like it to. I'd like to add support for arbitrary triggers, but that isn't going to work well before I can solve the problem of argparse not supporting optional groups or subparsers.