Clean the code of mine_main.py