Refractoring piece to use transformation matrix for translation and
rotation