Changes to I2C code