Fixed a bunch of ruby style issues.