Move config definitions into a function.