Made the static heuristic slightly more scalable