Basic test of shared pointer; Added use cases for matrix