refactor html, css for last made states