started on new way of doing bounding boxes; other small changes as well