Added shuffleLayouts() function