Adding MongoDB persistence.