load main js sooner
added documentation for a few utility methods