Cleaning up Transforms.hs. Using mapM instead of explicit recursion; adding comments