Fix exception message for closures.
Remove debug code.
Pass $model instead of $model->getId() to the id serializer.
Add missing import.
Initialize DefaultContainer::$definitions property.
Fix cloning $dataContainer in DcGeneralFactory.