cleaned up quaternion rotate code