Splits large layout functions into smaller ones