Refactored some of the string formatting code into a separate function