Code clean up for transform3.