Refactor preparing packages from scratch