Moved the grayscale conversion to a separate function.
Conversion to grayscale now happens automatically when an image is loaded.
Removed the "Transform" button and corresponding code.