Made compatible with Rails 4, updated docs