i2c device class refactor