Code enhancement related to WF-1604, and code corrections to fix WF-1602