Refactor for pypi