lots of view hiding code if EDITOR is defined - need better solution