Various fixes, added KQuaternion class.