Refactor config base