Moved a lot of the stuff into a 'config' file to clean up a bit