Refactored xf:do, xf:do-each and xf:transform, fixed tests