label.c/h
Finally optimized the "fix_caverns" function using the labelling algorithm.