Clean up some crufty code in the action handlers