Major memory usage improvements.

First, transformed arrays are now SP, like the input data, instead of
DP.  The uniform grid construction , Grid(...), is now broken into
peices so memory can be cleaned up in between steps.