Adding in unit tests for matrices