some more matrix cleanups