refactoring js, css and img