Format code according to Ruby Style Guide

I noticed that not all code was formatted according to the ruby style guide. I've fixed it in as many places as I could find.