Refactored i2c functions somewhat to improve comatibility with non eeprom devices