Simple JavaScript quadtree