Refactor into package.