fix foreach coding style

Just noted a unusual `foreach (.. AS ..)` and there were some more of that kind and `foreach(` and it was to late to do anything more complex anyway. Or something like that ;)

Unimportant code styling/ consistency fixes.