Few generic changes to convert over to mongo