mail, created unit tests for mail code, refactored from scratchpad to ecc and mail folders