Added simpler html syntax, moved more logic to JS
Removed whitespace.