DRYing up stuff