Added support for affine transformations.  WIP