Simplify main in iet.py