Move editor selection processing gunctions to Editor.lua