Added comments to outline logic of pack init function