API improvement and setup.py