refactored some functions; added MimeTypes that enables to determine the mime type based on a file extension