refactored formats to include mimetype + misc changes