Updated for Windows support