Several bugfixes.  LocalDrive now compiles again with MSVC.