refactor: add more cases to PackageReferenceTests and clean up
Merge pull request #854 from adamralph/refactor-package-reference

refactor: add more cases to PackageReferenceTests and clean up