reverted dictionaries to lists, added remove_edge method