i2c fix & code refactoring v1.1