Some changes to support mongoid in Faalis core