Add main function to main.c