Refactoring js and css