restructured some code to allow for reuable parts to do a combination PCA+SteepestDescent search