Adds get_rows and get_cols to SparseMatrix class. Moves stuff from main into functions for each problem