More tidying up and formatting.