Moved the JS submodules to a js/ folder

I'm not sure whether everything is correct...