Add compression support, redo mimetype handling, change config file parsing