Pick up SMatrix changes.
Merge pull request #588 from ktf/use-smatrix-changes

Use smatrix changes.