vjr refactoring for edit and compiler logic