Refactor DbConn, MailServer into separate file