adding the sources I used to test whether I could change the foreach statements with for…in loops...

...problem is that foreach works fine even when the loop changes the
items you are looping on, while for doesn't
just some minor optimisations, creating intermediate variables for area.left() and area.top() so that one saves a little bit of time. Worth doing? Probably not, but it's probably more readeable than before.
rebuild and docs