fixed javascript and put css in separate file