Make main.py to entry script
Implement cleanup