Updated Gyro code