S-48712 Refactored eventStore.js