Fixes part 2 from code review - refactored goToNewPageWithEdit