Code cleanup.
Improved saveToGallery(...) method.
Adjusted gradle file.