Refactor JSON help/editor generator