Cleaned up the java script file.

And removed unnecessary HTML item from the image Template file