Extract altIOStuff; refactor