Fix bug with hash table resizing, links update.  Modify template code generator for AggrType2 aggregate functions.  Add cleanup routine, do code cleanup.