Remove recursion from fitting; fix incorrect implementation

In my initial translation I changed everything to uint accidentally,
which made a check that a number was positive nonsensical, so it was
removed. I should have had the parameter to fitting be an int, though,
since otherwise fitting would always just return true.