Added mongodb persistence support.