Migration to VS2013, refactoring