Reworking error_handling.h to throw much more useful exceptions with errno information and more.
Fix warnings about struct/class mismatch in test_matrix.
Reducing size of test_map testcase by during fewer random queries.