Quaternion math lib added plus minor changes here and there