Fix set optimizing code
Refactor
Improve documentation
Clean up
Refactor
Generalize CodeWriter
Add dot codegen
Add graph helper script