Rel pack

Improved the packing function to be configurable