Refactor notebookapp __init__ method.