CDB-3242 Added logic for creating shared entities and first (not complete) spec