Separate IPython kernel implementation from kernel machinery