Updated files

New structure for BranchWrapper.  Added most HEEP variables.  Tested in
debug mode.  Moved sort functions to a new file.