FIX for Diagrams and algorithms

Fixed not outputting the right number of diagrams, and several small
issues
No longer assuming 100% transition-pair initial coverage