Action framework

Fixes #1016