Restructure with abstract classes, add support for command line options.
Include command line use instructions in the README.