Refactor setting content type