Fixed a typo in the readme and documented a bunch of the ruby code