Add setup.py, refactor script into scripts/