Refactoring to make project compile under MSVS2013