Removed redundant calls for zeroing of memory, especially where replaceable with a single memset(ptr, 0, sizeof(struct ...)).