DRYing some things up