Update to use pkgid
Remove some dead code

Thank you, dead code detection pass!