better layout code