Added bounding box intersection logic and some tests.