Refactor configs