Moved JS files into a `js` directory. Various code styling changes.