Changes to make the projcet compilable in Windows; test pass;