Fixes, and perhaps some problems

I think I might have messed up the merge of the quadtree...