Cleanup for path building.