Added an autoload function for packages