[WIP] Use platform-specific iterators instead