Added functions to save the base to .ipynb.
Requires the remove_metadata to be defined to remove metadata.