Reorg of the files and pull out main method to mail.cs