Fixed some errors in the CSR matrix procedures and added matrix tests into the make test target