Code cleanup pass on gyro code