Added main.c and changed core.c