Cleanup of CDEFs. Added some Windows specifics.