fixed and cleaned i2c support