Fixed TableGenerator, making it a proper object, and fixing up the logic
that determines if the limit should be overridden by the remaining
number of results.