Remove unnecessary arrays