Added basic tests for graph.py; adjusted some docstrings