Update main.c and Makefile