Some graph refactoring to make it cleaner
Add some comments and clarify some node names