nit: Much of the indentation in `handleEvent` is off by one space