cleaned up code. made nice interfaces
updated main for new interfaces
Merge branch 'updates'

Conflicts:
	main.c
adding i2c functionality