Refactor config schema