lot of cleanup and password reset email generation