Completed Major Refactor. Modularised JS.