The Matrix class is refactored and documented