Removing the json gem and other cleaning.
Requiring rubygems for Ruby 1.8 compatability.