Tweaked matching algorithm after last meeting. Saving feature matrix and feature names to files as well