Reorganise Main.py a little