switched matrix tests to arrays
changed tests to match dictionary interface
Merge branch 'tests'