Removed wasteful shared memory
Added buffers and scans for quadtrees.