Named actions implementation

Replaces #3057 and fixes #3030. Original code from there, with comments addressed and rebased. Credits to @saebekassebil for the code!

/cc @yurydelendik