Adding Matrix class.