Refactoring String Writer