Added Graph interface.
Made ListGraph generic