Added string trimming functions
Better error catching
Now confirmed that MIME construction is correct
Lowercasing was being done at wrong spot
Improved