Do the allocation of the item frames for a section in the main for loop

Do the allocation of the item frames for a section in the main for loop of prepareLayout instead of in a separate loop before the main loop