lots of cleanup and repackaging on windows version