Finished refactoring to facilitate building a binary.
Added README.