Abstract out helper HitsToPaths