I like to see all events handled in a single function. That's fenitely an improvement that makes this code more maintainable.