Re-indent and clean up some use of Matrix objects