Some improvements to package.py