Edit opp refactor