Addressed code review comments.

- Changed new StringWriter() instances where we didn't need the StringWriter to be TextWriter.Null