Minor code DRYing