Refactoring the packing