Add a routine for maintaining diagonally connected parts of black cells