Streamlining main.py