Set the catalog item id used when creating BOSpecs
Fix compile warnings
Initialize the context catalog item id when adding items to the BO hierarchy.