Incorporated Rails 4 compatability changes