Fixed some missing constants and added a cleanup function. Fixed the i2c
example