Implement bundle arithmetic

@toranb I've fixed up the tests and squashed your PR into this.

Let me know if you have any final feedback before merging.