bundleID fix

Improved the bundle() function to cut down on repetitive code.