Made some changes so the gem stays Ruby 1.8 friendly.