some cleanup in JSONwriter