Implemented email functionalities directly. Changes to email error
handling. Removed unused library. Reworked some tests. Updated TODO.