Refactor 'Temp to Query' PackageGenerator