Removing unneccesary arrays