#21064: first draft of skeleton for future refactoring