Rewrite PackageManager and Package