Some groundwork for nested variant