A small change to the editor application; refactored some directive code