Optimizing images, utilizing image dimensions for performance
Adding Environment class for environment checking