Refactor PKGBUILDUP, less code