Split out the setup plumbing into a Brain.  Use argparse.