Refactored and Added mime-type