Corrected IO, at least
main.py now iterates properly, etc.