add setup.py and support for restarting