js code refactoring
improved html code, described valid by w3.org validator