Adjusted for changes in matrix package.
Run gofmt.
Minor changes.