Tisying up unsed functions and variables
Fixing #53. Also some JS tidy-up.
Merge branch 'master' of https://github.com/aodn/aodn-portal