Terrain shading

Smooth shading is now (finally) working.  Also restructured and
optimized data, and tweaked threading to prevent over-writes.