Both working and pretty well tested.  Implementing BFS next.