layering img, css, js and refactoring