adding layout to all pages
tidying up and removing console logs