Added Comments and neatened up the code
Initialise the init function from the page not the js file
Merge branch 'js-script'

* js-script:
  Initialise the init function from the page not the js file
  Added Comments and neatened up the code