Changed the main program to read a config file and also added csv reading