clean up APIs for matrix-variates