Tests should be added to verify that the rotation matrices produced are correct.  E.g., A*A.T = I, etc.