Remocing errors in the script and html
Also removing unecessary code