Restructure, adapt for max 16MB chunk size