Tested and corrected version of program.

Tested the program with empty, invertible, and non-invertible matrices
and corrected bugs.