Added doc blocks, also fixed invalid for each.

There was an invalid foreach exception being thrown as the local
properties where null rather then being arrays.