Added Mat2 documentation and fixes