Some of the dumb changes demanded by instructor's checkstyle program
Use BFS cache to remove remaining g.V-length loops in SAP