Refactor so the non-Windows part can partake in the iterator