WYCS: various tweaks to try and get better debug messsages out.