Update notebook. Add logic to dump results to file for Peter.