JS and CSS Refactoring