clean up some code relating to config