Matrix mlp

Merging the matrix MLP into the master branch as the MLP code is mature.