Simplify conditionals on edit() and other minor changes on interactiveutil.jl

Simplified the conditionals inside edit function, separated less and edit functions and added a little more comments