Adapt to changes in matrix interfaces.
Adjusted for changes in matrix package.
Run gofmt.