Fixed set() and unset() not stopping inside cond.
Added test for replacing root value
Removed unattainable code
ensures walk() returns after the loop