Remove unneeded local variables from Matrix
Add tests for mutability
Update documentation