Added VS2012 solution and project files + a couple fixes.