calloc buckets and minor changes