Cleaned up main.py