Removed the calculation of the inverse matrix since the rotation matrix is orthogonal, therefore inverted == transposed. Much simpler and mathematically robust.