Imported from https://github.com/MGH-LMIC/windows_optimization
