Reordered resource loading so JS comes before everything else