Everything compiles cleanly again, tests on Linux pass.

Tests with Visual Studio 2012 to come...