Transform/extension methods

New phase ported: extension methods
Why was check for idempotence replaced by purity check?