Bug fixes.  Converted all msvc function types to explicit __stdcall for now.