Added more functions to NodeGraph and changed some member names.
Also added error checking to Edge constructor.