Move action handler to actions object in example