Move ediff stuff to init-ediff.  Minor refactorings