Refacturated the splitting of arrays