Refactor webtestNewDialogContact and other webtest cleanup