Refactored scripts and cleanded up setup.py