refactor html and css, trying to generalize and remove mod