Exclude text and graphviz output in .gitignore
Add some comments and some refactors based on code review