refactor the layout and css