Fixed images and cleaned up code