Named actions implementation

Replaces #3057. Original code from there, with comments addressed.