refactoring in preparation for making defered actions stopable