Update main.c

Define dynamic memory allocations for structures and filing purposes