Added new classes for working with graphs