First shot of separating out the Javascript modules