Refactor configuration to be all in one place