Made some minor changes to the pca code