More cleanup and change to calloc.