DRYing up the layouts