Implemented more of RTree splitting function