Added dummy Edge and Node classes.
Added Validator class to check graph for cycles and consistency.