Edited MLDist to contain the matrification of features. That should be moved out to another file later.