Cleaned up notebook implementation