Refactors reload_editor method

Refactors reload_editor method so that it could also be called by future features efficiently.