Refactored the PkgFile slightly.