added config file and start of support for reading in