Updated parameter names.
Fixed a typo.
Clean up quaternion transform calculations.