Added DetachPrimitive and SleepPrimitive.