Removed inline event handlers.

I'd be obliged if you could give this a second look - quite many changes so I hesitate to push it directly to master.