Used a javascript linter plug-in for sublime text 2 to tidy up the javascript files.
Changed the directory structure yet again. The client is now run from within node, served statically by express.js