Fixed Makefile. Fixed bug in matrix_to_row (at least partially). Needs more tests.