refactoring content negotiation files