Makes role optional in the bundle service
Adds function to sort bundles bu their priority