- pass heap to allocate from directly to helper functions, instead of unnecessarily copying returned data - use public types rather than internal ones - make sure GetBestRoute doesn't return bogus matches