cleaned up the config code, simplified the reading and making of config