upgrade solution to vs2012
format code
refactoring