Mainify things.  Fixes #1.