Rebuild data structure