huge update to Main.py