Refactoring and CSS updates