add comments
simplify makeCodeBlock implementation
checkpoint: next function to work on is compileDiagrams