Many new matrix functions and test cases