Refactored the way editor injects select/drag/resize functionality into template controls