Switched to using calloc instead of malloc for
memory that needs to be zeroed.