small code cleanup changes while debugging addwidmaster