Add more tests.
Make horizontal_graph pass unit tests.

Updated the _matrix_add_column function to avoid adding extra blank characters
at the ends of lines. Now padding is only added if it is needed.