Refactor setup.py