Feature #1685: Merge states cleanup - cancel, and epilog - epilog_delete