Add split and reindexing with tests