Added crossvalidation and a better PCA