Changed to C code and Makefile