Cosmetic changes.
Make private.
Misc refactoring.
Refined the graph drawing routine.