Continues to improve event handling. Still not quite right.