Utility code dealing with actions.