Convert to use wxCurl and some cleanup