Various improvements to transpire script