Added -Werror to Windows makefiles.
64-bit fixes. Some changes to aid portability. A few other tweaks.