Modify main.c, add Makefile, transfer function skeletons to main.c