Refactoring core js and css