Updating everything else to use new matrix functions.