Switching backend database to mongodb