Adding modeling capacity to pipeline, also enabling model subtraction in flagging routines