Applying closures to event handling methods.