Changed the Exception types thrown by errors in graph.py
Removed some print statements
Created several test cases for ttrg