Refactoring the "complete activity" logic so that tools, gates and grouping screens all complete in the same way. Without this change, when the gates and grouping screens were opened in popup window (after completion), it tried to go to the next activity rather than closing the window.