This is a precursor to another upcoming PR that will make use of these changes, but it makes that PR more manageable.