Cleaned up code using Magick classes.