Improved autoloading of packages