Big refactor commit.
Update README.