codes refactoring for js and css codes #3