Made the JavaScript includes more self-sufficient.