Updated to support Windows and program restart