Added backsub and mgs functions, fixed printMatrix function