Moved code to private StringifyImpl() and changed the public interface to Stringify(bool prettyprint), for clarity