Refactoring for more Windows friendly deployment