fix namespace problems and rename the itemtype table