Refactor event model