Added loading of config file and main function