Graph class code

Implemented all the expected methods in the Graph class. Also added
javadocs for it. Minor updates to the Node class.