Change to using Mongoid