Added source logic.c and Makefile