Added main.c and main.h which contain functions for export.