Use strict mode
Fix prefs in strict mode
Implement attachments
strict mode fixes