Micro refactoring for nested_step feature