Merge early parts of branch 'np/pack'