Set notebook nbformat in toJSON
Make Contents.new more generic