cleaned up code and optimized images