Replaced has-curr-val? with rec-dirty?
Refactored default value logic.