Refactor Mailer module to namespace