Adds promises and helpful safety checks. Now supports windows.