Move main() and configuration file related functions into main.c