Events refactor (work in progress)