Refactor, set up config object.