Changing FibGen from recursive to iterative.