Added quadtrees for collision detection