C main function added.