Refactor to use central config object