Changed to support DOM4 custom events
Catch exceptions in external data handlers
Remove undefined references in objects