fixed compile warnings from MSVC; fixed warnings in Python bindings; added some debugging code