Extracts logic to a single method
Removes loop for gettign editorViews
Merge branch 'refactoring'