Refactor

* Restructure the implementation of operator ==
* Move implementation of __string__() to matrix.cpp