Move more stuff to wdm.h fixing what needed to be fixed.