Tidied & removed unneeded js