Rename HashToList -> ScopeToList, move to scope.h