Remove MAT

Fix #497 
Close #492
Fix #348 
Apologize to @gnusosa