Text editor improvement

Also added clearing old variables from toolbox when switching kits
will be edit --> will edit