Refactor html and css codes