Added state() function to edge
Store and restore edge state in lists and graphs