Remove extension only on Windows
Improve tests
Refine