adding images and refactoring parts of js