Strip prefix/suffix on empty children during render. Attempt at code cleanup.