changed internal storage of matrix elements to using the Fraction class, this solves a lot of computation errors that were occuring.