String output code refactoring.