Basic PCA implementation.