Add LICENSE & README.md
Clean up some naming, add comments, polish.

Mostly cleanup stuff and adding command-line flags.