PIM-3530 : re-work ObjectDetacher and add specs
PIM-3530 : fix CS