Refactors adding of actions.