Revert eb67744..3f05c38

This rolls back to commit eb6774452387776b4e9ded307c003604dbdca610.
Fixed problem with degree-2 nodes.

Vector ValidId is now used to store the correct nodes id.