Made changes to bsp tree sorting algoritm