Win32 port (MSVC) and some general fixes
Small fixes.
Merge pull request #210 from rgsilva/master

Win32 port (MSVC) and some general fixes