Small cleanup

Preparatory commits for a refactoring that got interrupted in the middle.