js and css refactor