Finish test for confirmation email and refactoring