Cleanup and image optimization