change bzero (non-stdlib function) to memset
int64->int8 conversion warning fix
signed vs unsigned comparison fixes
visual studio's "safer" file open (to get rid of warning)