cleanup: use size_t for new_areas_index and max_new_areas