Restructure the html, css, and js code