Fix WL-2961

Some refactoring and introduction of the callback method for oxitems.