Add action registration

This makes it easier to reuse common actions.