Optimized images, cleaned up code