Matrix class, validation and unit tests.
Merge with github auto-created files.