Re-factored codebase with a lot of minor changes: see README.md.