properly memset arrays to 0

reverting use of static arrays revealed this memory overflow bug since our arrays are no more initialized by default to 0
properly use memset to 0 all the array

for portability, we should write our own memset_to_null() function since memset 0 is not gurantied to give NULL to all array member pointers
code clean up
6.51.4