restructure definitions