Various fixes

When sending mail the content is assumed to be html so conversion to text is no longer attempted.
Fixed to loader animation for firefox.
Cleaned up some code.