Refactor app.js
More front-end tidying up
Debug import script