formatting
various small refactors
reorder and refactor slightly
start of a new diagram
place new diagram into writeup