Miscellaneous refactoring in support of desectioning a pid stream