Cleanup changes due to WinCE and move to libce where possible.