JS variables grouping and globals clean-up.
Grouped JS variables and removed unused global $wgScriptPath.