made the editor a directive, added a couple of todo's so that it is
clear that more state needs to move into the directive