Added a way to calculate continued fractions; seems to be working