Sparse representation of M-vectors. Tons of bugs fixed, lots of tests added.