js code out of html
removed unnecessary and repeated functions
authors
merging