MaTeX v1.0 100% refactored

Still has errors