cleaned layout code