Converted Euler rotations to Quaternions

Converted local Euler rotations to Quaternion based rotation to avoid
gimbal lock.