Added factory methods to create graph objects