This line is not very clear, what does `removeAll` do with an array of a single null element? Is this line necessary?