DRYing up layout