Cherry picking some fixes into fork.
Bumping Gemfile to work against mongoid HEAD (4)