Removed EmailJob and imported the email library. Made some code
improvements.