Refactor mongo event store