Revert "more tweaks to make it load faster."

This reverts commit 85941f9628d2f563d023f4937d074b4dd552c554.
Reverted back the javascripts to original.

something went wrong with the previous attempt to optimize js.