Added a "trim" procedure to the memory manager, along with unit test code.
  (Not sure where all the sample-data renames came from)