change visual studio versio of project to 2012
some refactoring