flushed out examples a bit
moved invertible transform and made it generic