view/edit opportunity refactor