Fix URLs in comments.
Add some compilation conditions for MSVC as temporary workarounds.
Fix formatting in grid_tools.cc.