Refactor: Adds a new class named `PackageScanner` to do the logic of scanning a package.