improved html and scripts

removed all onclick in html
moved all script at the bottom of body