Refactor event