clean up/simplify/shuffle around wshd code