Attempted refactor to get BFS correct. Works, but doesn't give shortest path. Possibly replacing it with bidirectional search w/tree structure instead.