Update code so it compiles under VS2010, and add project/solution