move parse config functions into config object.