Added some support for basic graphs, not fully implemented yet.