Package structure optimization