Rails 4 support; general update

* The helper functions now support the changes in Rails 4