Completing TWI function and add Makefile