Added scaling to the rotation matrix calculations