Publish global functions, better initialization

Add option to publish functions to global scope.
Define basic UTIL functions.
Take initialization functions out of DOMready (via jQuery), which made their calls nondeterministic.