refactoring css and html code