Simple utitlity to help deal with toggling actions.