Refactored evenstore-lite.js.