Extract code that removes array table