Refactored headers out of common. Extracted i2c functions.