Refactored some logic from ServerToJettyHandler to Content