Code clean up. Replace sprintf with string_format.