fix delete function, set format to json for notebooks

Some more fixes and compatibility with the recent changes in iPython master.