Change event handlers to use on() method