Move build serialization logic to maintain pagination