Refactoring for packaging.