Pastable version of two for loops cleanup?