Code refactoring of I2C device structure.