Some refactoring to reuse the same graph for several trackings.