Refactored tile data reconstruction to function