Improve the debug serialization
Adjustments to initialize temp

Avoiding the tricky logic involved with the premature optimization
and using a simpler partitioning of the processing. Now dividing
the input number string into three types:
 - length < 17 digits
 - length = 17 digits
 - length > 17 digits

Number strings of zero length (or effectively zero length when all
the digits are zero) are not included because they are handled
separately at the beginning of the funtion.