Refactoring event model out of server.js