still need to refactor some stuff -- lots of code duplication here that we can get rid of
the only reason any of the Windows code was in CPP files was because the MS compiler doesn't support C99. Switch to using MinGW, and that problem goes away, so we can rename the files back.