Extracted layouts and general tidy up