Fix the problem with the start and end tag of the event handlers.
Merge branch 'cleanup'