Added config file support to main.c, got main.c working end to end