Forgot to commit half of the files in last commit.

- Also added __main__.py to provide a commandline entry point.