Refactored some code in BBoxRender