Cross validation

Rewrote split function to work with the "mat64" library.