main.py now loops until exit is requested