Split out from #37.
Split out from #37.