Last version of transformation matrix. It closes issue #20