FIxed bug in graph node/edge removal; updated tests