Added main_functions.c and makefile