Move logic into a package.