Fix string.format handling of integers
Break string formatting code into separate module
Fix string.format handling of floats