Modified code to be a package.