Zero padding bug fixed.
All original tests now pass, plus new tests involving string formatting.