Collapse action and function inputs into one