Replace "struct continuation" mechanism by something more extensible