Progress on layout code