Rewrote the internals of BBox to fix related bugs.
Should fix GitHub issue #30