Rebuilt the file structure.

This meant the JS needed re-doing as well