Simplify code for action helper

Functionality remains exactly the same.