events: Refactor into more idiomatic CoffeeScript