Split out/refactor JS
Merge branch 'Feature-Separate_hub_code'