Refactor Config