refactor code css, html, js