Improve setup.py so it can be used for packaging