Reworked structure of imagetransform.rb