Added PCA, some reorgnization.