Clean up actions

DRY-ed a few actions for readability.