Restructure prefix table