Convert to Visual Studio 2010; fix tests; fix source analysis