Simplify variable declarations

We're not in C anymore - no need to only do declarations at the
beginning.  Logic can happen between declarations.  Make things more
clear.
Return resultant fractions from function instead of printing

* Don't print anything to stdout in the function - instead return a
  table of tables - each table containing the numerator, denomintor,
  and error value (in that order).  Two such tables are in the table of tables.

* In the main body of the lua code, print the results nicely.