Handle different MIME types
Add archive message
Put api specific code in separate module