Migrated the solution to VS 2012.

(and introduced some bugs :) )