Safer Pipeline

Do not share global objects json and xml with middleware.