The two halves of this part can run largely independently. Hence a version 4 of this patch followed that reorganized things completely. This reverts commit d7d787d2.