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