Split main.py into smaller files