Better DOMReady event handling, UTIL setup.

Cleanup.
Improve event handling.
Make DOMReady event functions more explicit as such.
Better stub when global.UTIL is not provided.