Update readme, and write a bunch of unit tests