Large changes to make the memory footprint a lot smaller by increasing
the base size by a little.  Caching of templates.  Session size limits. 
A little cleanup might be required.