Refactor to emit events