Use newest event framework, and fix to code to match