Improving Matrix tests