Refactor config files