Added PCA. Changed csc functions to calculate error in terms of magnitude. Some other stuff.