various tweaks, split pack routines into separate bindata module