Refactor quadtree events