Simplify bundle formatting code