Fixing images and refactoring