fixing up build system for js, moving main js include to foot of page