Modified Node class and added basic Graph class.