suppr useless lines
simplify treatment (template instead of lines
improve mat3vec and add exclude outliers option
add mat to return