Minor updates.
Pulled out dimensionality reduction functions. May or may not use these in the app.