Refactor config handling in preparation for live runtime config changes.