Add Graph class and unit tests