Refactor config file