Add copyright declaration
Change example to use more idiomatic foreach-construct
Extract active grid points for top surface
Basic value types for addr. items in 2D struct. grids
Move basic grid stuff into its own compilation unit

Make it easier to review the basic grid index calculation by keeping
it in its own unit. Also increases the chance of ever reusing it.
Use more descriptive types for Cartesian indices
Use general run-length iterator for columns
Make dimensions comparable
Extend side and corner structures to three dimensions
Improve function name
Improve method names (don't clash with data members)
Find active nodes in top surface and calculate coordinates
Protect members from direct access